package com.epam.qanda.db.service;

import java.util.List;

import com.epam.qanda.db.dao.impl.UserCategoryDao;
import com.epam.qanda.db.model.User;
import com.epam.qanda.db.model.UserCategory;

public class UserCategoryService {
	public <T> void create(T element) {
		new UserCategoryDao().create(element);
	}

	public <T> T read(Integer id) {
		return new UserCategoryDao().read(id);
	}

	public void delete(Integer id) {
		new UserCategoryDao().delete(id);
	}

	public <T> void update(T element) {
		new UserCategoryDao().update(element);
	}

	public List<UserCategory> getUserCategories(Integer userId) {
		return new UserCategoryDao().getUserCategories(userId);
	}

	public List<User> getCategorieUsers(Integer categoryId) {
		return new UserCategoryDao().getCategorieUsers(categoryId);
	}

	public List<User> getAllSubscribedUser() {
		return new UserCategoryDao().getAllSubscribedUser();
	}
}
